package kr.hkit.powerjava.chapter15;

import java.awt.Graphics;

import javax.swing.JPanel;

public class MyPanel extends JPanel {

//	private int y;
	
	
	/**
	 * Create the panel.
	 */
	public MyPanel() {
//		this.y=10;
	}
	

	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		System.out.println("MyPanel-paintComponent Call");
		//도화지에 그리겠다.
		g.drawString("Hello Java", 10, 10);
		/*for(int i=this.y ; i<300; i+=10){
			g.drawString("Hello Java", 10, i);
		}*/
		
		g.drawLine(10, 20, 110, 20);
		g.drawRect(10, 30, 100, 100);
	}
}
